import { Message } from 'element-ui';
import { mapState, mapActions} from 'vuex'
export default {

    data() {
        return {
            dialogVisible: false,
            isPdf: false,
        }
    },

    components: {},

    computed: {
        ...mapState({
            dialogImageUrl: state => state.allState.dialogImageUrl,
        })
    },
    methods: {
        ...mapActions(['setImageUrl']),
        handleRemove(file, fileList) {
        },
        handlePictureCardPreview(file) {
            if (file.raw.type.indexOf('pdf') > -1) {
                this.isPdf = true;
            } else {
                this.isPdf = false;
            }
            // this.dialogImageUrl = file.url;
            this.setImageUrl(file.url);
            // console.log(this.dialogImageUrl)
            this.dialogVisible = true;
        }
    },
    mounted(){
        
    }
}
